# Create analog HMI tags

Analog HMI tags can have a range of values, and can represent complex states, such as the position of rotary controls or a temperature. When you choose the analog tag type in the Type box of the Tags editor's form area, the additional input boxes described below appear.

## Options

- Tag
  - Minimum/Maximum

    Type the minimum and maximum values acceptable for this tag.

    These boxes establish the minimum and maximum possible values for the tag. They ensure that values outside a specified range will not be written to the data source. However, values outside the range can still be read from the data source.

    Important: | The minimum and maximum values for a floating-point analog tag cannot exceed the range +/-3.40282e +38.

  - Scale

    Specify a scale value. The value from the data source is multiplied by the scale value before it is written to the value table. The value specified in FactoryTalk View is divided by the scale value before it is written to the data source. A scale value of 0 will result in an error.

  - Offset

    Specify an offset. The offset value is added to the (scaled) value from the data source before the value is written to the value table. It is subtracted from the value before it is written to the data source.

    Scale and Offset values work together to modify the "raw data" that comes from, and goes to, the data source. Scale is a multiplication factor and Offset is a fixed value. Values from the data source are first scaled, then the offset is added. The formula for this calculation is:

    `FactoryTalk View value = (data source value x scale) + offset`

    When a number is written to the data source, the process is reversed. That is, the offset is subtracted, and the scale number is used for division. The formula for this calculation is:

    `data source value = (FactoryTalk View value - offset)/scale`

    This ensures that the correct, unmodified value is sent to the data source.

    The default values are Scale = 1 and Offset = 0. With these values, a value from the data source will be saved in the database unmodified, and values from the database will be written to the data source unmodified.

  - Units

    Type the units the tag value is measured in, for example, PSI or rpm. The text label is for display only. It can be up to 20 characters long.

  - Data Type

    For analog tags with Device as the data source, the data type determines the format used when reading and writing tag data to the data server. Select the data type that matches the format of the data stored in the data server.

    For analog tags connecting to a Logix 5000™ processor, specify a data type that corresponds to the data type in the Logix 5000 processor: Byte, Unsigned Integer, Integer, Long Integer, or Floating Point.

    Important: | Do not point an analog HMI tag to a Boolean device tag.

    For tags with Memory as the data source, select the data type that matches the format of the data you will store in the tag.

    Choosing Default is the same as choosing Floating Point.

    The data types and their allowable minimum and maximum values are:

    - Unsigned Integer - unsigned 16-bit integer; range 0 to 65535
    - Integer - signed 16-bit integer; range -32768 to 32767
    - Long Integer - signed 32-bit integer; range -2,147,483,648 to 2,147,483,647
    - Floating Point - single-precision (32-bit) floating point; 1 bit is used for the sign (if any), 8 bits for the exponent, and 23 bits for the significant. This allows no more than 7 digits. In FactoryTalk View Machine Edition, floating point values are rounded to six digits. Therefore, using a floating point data type and adding to it a value that exceeds the 6 significant digits will result in a loss of precision.
    - Byte - unsigned 8-bit integer; range 0 to 255
    - 3-Digit BCD - 3-digit binary-coded decimal; range 0 to 999
    - 4-Digit BCD - 4-digit binary-coded decimal; range 0 to 9999

      Tip: | The default data type is Floating Point. For tags using data types other than floating point, the data will be stored internally in 'int32' (32-bit signed integer) format. For tags using data types other than floating point, if the scale, offset, min, max, or initial value is used with a decimal point, the value is stored internally in floating point format. This means that the maximum value for the tag is 16,777,216, which is the maximum integer value for single precision floating point numbers. Each graphic display can contain up to 1000 expressions or references to tags.

## See also

Create HMI tags

About data sources

Log tag data

The Tags editor